Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

feat(sortKey): add sortKey to contract response #53

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

dtfiedler
Copy link
Collaborator

@dtfiedler dtfiedler commented Nov 10, 2023

This allows those evaluating contract state using warp to use this service to bootstrap state from our cache

Example:

const contractTxId =  'bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U';

// get contract manifest
const { evaluationOptions = {} } = await getContractManifest({
  contractTxId,
});

// Read the ArNS Registry Contract
const contract = await warp
  .contract(contractTxId)
  .setEvaluationOptions(evaluationOptions)
  .syncState(`http://localhost:3000/v1/contract/${contractTxId}`);

This allows those evaluating contract state using warp to use this service to bootstrap state from our cache
@dtfiedler dtfiedler requested a review from a team as a code owner November 10, 2023 18:47
@dtfiedler dtfiedler changed the title feat(sortKey): add sortKey to contract payload feat(sortKey): add sortKey to contract response Nov 10, 2023
@@ -69,7 +69,8 @@ export type ContractReservedResponse = ContractBaseResponse & {
// Warp types

export type EvaluatedContractState = EvalStateResult<any> & {
evaluationOptions?: Partial<EvaluationOptions>;
evaluationOptions: Partial<EvaluationOptions>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we intend to lose the optionality of this in the interface?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep - we will always return it

@@ -19,4 +19,8 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
ignores: [(message) => message.includes('[skip ci]')],
rules: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intended change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes - it was preventing good commit messages that @djwhitt has pioneered

@dtfiedler dtfiedler merged commit a934f6c into main Nov 10, 2023
6 checks passed
@dtfiedler dtfiedler deleted the PE-5003-add-sort-key branch November 10, 2023 19:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants